export const formatMemory = (bytes: number, type: string): number => {
  switch (type) {
    case 'GB':
      return Math.round(bytes / 1024 ** 3)
    case 'MB':
      return Math.round(bytes / 1024 ** 2)
    case 'KB':
      return Math.round(bytes / 1024)
    default:
      throw new Error('Unsupported type')
  }
}
